package com.zmn.plat.services.impl.service.citygroup.item;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.zmn.plat.model.entity.service.tariff.citygroup.ServiceTariffCityGroupQuery;
import com.zmn.plat.model.entity.service.tariff.citygroup.item.ServiceTariffCityGroupItem;
import com.zmn.plat.model.entity.service.tariff.citygroup.item.ServiceTariffCityGroupItemQuery;
import com.zmn.plat.persistence.interfaces.service.tariff.citygroup.item.ServiceTariffCityGroupItemDao;
import com.zmn.plat.services.interfaces.service.tariff.citygroup.item.ServiceTariffCityGroupItemService;

/**
 * @author tanbiao
 * @description
 * @since 2020/5/28 15:01
 * @modifier
 **/
@Service
public class ServiceTariffCityGroupItemServiceImpl implements ServiceTariffCityGroupItemService {
    @Resource
    private ServiceTariffCityGroupItemDao faultCityGroupItemDao;

    @Override
    public ServiceTariffCityGroupItem findByKey(Integer itemId) {
        return faultCityGroupItemDao.findByKey(itemId);
    }

    @Override
    public List<ServiceTariffCityGroupItem> listPageByQuery(ServiceTariffCityGroupItemQuery query) {
        int count = countByQuery(query);
        query.setTotalCount(count);
        return faultCityGroupItemDao.listPageByQuery(query);
    }

    @Override
    public List<ServiceTariffCityGroupItem> listByQuery(ServiceTariffCityGroupItemQuery query) {
        return faultCityGroupItemDao.listByQuery(query);
    }

    @Override
    public List<ServiceTariffCityGroupItem> listAll() {
        return faultCityGroupItemDao.listAll();
    }

    @Override
    public List<ServiceTariffCityGroupItem> listCityCanBindByGroupId(ServiceTariffCityGroupQuery query) {
        return faultCityGroupItemDao.listCityCanBindByGroupId(query);
    }

    @Override
    public List<ServiceTariffCityGroupItem> listByGroupIds(List<Integer> listByGroupIds) {
        return faultCityGroupItemDao.listByGroupIds(listByGroupIds);
    }

    @Override
    public Integer countByQuery(ServiceTariffCityGroupItemQuery query) {
        return faultCityGroupItemDao.countByQuery(query);
    }

    @Override
    public Integer updateByKey(ServiceTariffCityGroupItem faultCityGroupItem) {
        return faultCityGroupItemDao.updateByKey(faultCityGroupItem);
    }

    @Override
    public Integer insert(ServiceTariffCityGroupItem faultCityGroupItem) {
        return faultCityGroupItemDao.insert(faultCityGroupItem);
    }

    @Override
    public Integer insertBatch(List<ServiceTariffCityGroupItem> faultCityGroupItemList) {
        return faultCityGroupItemDao.insertBatch(faultCityGroupItemList);
    }

    @Override
    public Integer deleteByKey(Integer itemId) {
        return faultCityGroupItemDao.deleteByKey(itemId);
    }

    @Override
    public Integer deleteByGroupId(Integer groupId) {
        return faultCityGroupItemDao.deleteByGroupId(groupId);
    }
}
